<template>
	<view>
		<view class="menu-list">
			<block v-for="(item,index) in menuList" :key="index">
				<view class="menu-tem" @click="itemClickHandle(item.url)">
					<u-icon :name="item.icon" color="#ff0000" size="70"></u-icon>
					<text class="menu-item-text">{{item.name}}</text>
				</view>
			</block>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				menuList:[],
				menuListZhong: [{
					icon: 'bag-fill',
					name: '后湖骑手管理',
					url: "/pages/manage/manageQs/OutQs/OutQs?place=2"
				}, {
					icon: 'home-fill',
					name: '麓南骑手管理',
					url: "/pages/manage/manageQs/OutQs/OutQs?place=1"
				}],
				menuListCai: [{
					icon: 'bag-fill',
					name: '财院骑手管理',
					url: "/pages/manage/manageQs/OutQs/OutQs?place=1"
				}],
				school:-1
			}
		},
		onLoad(options) {
			this.school = options.school
			console.log("hhh", options.school)
			if(this.school == 1||this.school == 0){
				this.menuList = this.menuListZhong
			}else{
				this.menuList = this.menuListCai
			}
		},
		methods: {
			itemClickHandle(url) {
				let that = this
				uni.navigateTo({
					url: url+"&school="+that.school
				})
			}
		}
	}
</script>

<style>
	.menu-list {
		display: flex;
		flex-direction: column;
		justify-content: space-around;
		width: 100vw;
		height: 100vw;
		flex-wrap: wrap;
	}

	.menu-tem {
		box-sizing: border-box;
		flex: 0 0 33.33%;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		height: 192rpx;
		border: 2px solid #000000;
	}

	.menu-item-text {
		font-size: 26rpx;
		margin-top: 10rpx;
		color: #333;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
</style>
